package com.sykj.manage.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sykj.manage.model.SysDept;
import com.sykj.manage.service.SysDeptService;

@Controller
@RequestMapping("/sysdept")
public class SysDeptController {

	@Autowired
	SysDeptService deptService;
	
	@RequestMapping("/findSysDept")
//	@ResponseBody
	public String findSysUser(Model model,SysDept sysDept) {
		List<SysDept> findSysDept = deptService.findSysDept(sysDept);
		model.addAttribute("sysdeptData", findSysDept);
//		Map<String, Object> result = new HashMap<String, Object>();
//		result.put("count", findSysDept.size());
//		result.put("msg", null);
//		result.put("code", 0);
//		result.put("data", findSysDept);
		return "manage/listSysDept.jsp";
		
	}
	
}
